package cn.tedu.clyback.font.methods;

import cn.tedu.clyback.font.pojo.vo.CaculateVO;

import java.util.Random;

public class WeChatAnalysis {

    public CaculateVO analyzeWeChat(String weChatAccount) {
        Random random = new Random();

        int resultScore = random.nextInt(100);
        String result = String.valueOf(resultScore);

        int mathematicsScore = random.nextInt(100);
        String mathematics = String.valueOf(mathematicsScore);

        String[] statsOptions = {"金", "木", "水", "火", "土"};
        String stats = statsOptions[random.nextInt(statsOptions.length)];

        String[] analyzesOptions = {
                "大吉，福星高照，此微信号预示着您将迎来诸多机遇和好运，事业、生活都将顺风顺水",
                "中吉，运势平稳上升，使用此微信号，您会在各方面取得稳步进展，收获颇丰",
                "小吉，有小惊喜和机会等待着您，只要保持积极心态，此微信号将为您带来不错的收获",
                "平运，发展较为平稳，没有大起大落，使用此微信号，您只需按部就班地生活和工作",
                "小凶，可能会遇到一些小阻碍和挑战，不过只要您谨慎应对，就能化解难题",
                "中凶，短期内可能会面临一些困难和压力，但只要您坚持不懈，积极调整，就能度过难关",
                "大凶，运势较为低迷，使用此微信号期间，您需要特别小心，谨慎决策，努力寻找转机"
        };
        String analyzes = analyzesOptions[random.nextInt(analyzesOptions.length)];
        CaculateVO caculateVO = new CaculateVO();
        caculateVO.setResult(result);
        caculateVO.setMathematics(mathematics);
        caculateVO.setStats(stats);
        caculateVO.setAnalyzes(analyzes);
        return caculateVO;
    }

    static class WeChatAnalysisResult {
        private String result;
        private String mathematics;
        private String stats;
        private String analyzes;

        public WeChatAnalysisResult(String result, String mathematics, String stats, String analyzes) {
            this.result = result;
            this.mathematics = mathematics;
            this.stats = stats;
            this.analyzes = analyzes;
        }

        public String getResult() {
            return result;
        }

        public String getMathematics() {
            return mathematics;
        }

        public String getStats() {
            return stats;
        }

        public String getAnalyzes() {
            return analyzes;
        }
    }

}